/*
 * @Author: sz
 * @Date: 2023-11-20 16:58:52
 * @LastEditors: sz
 * @LastEditTime: 2023-11-22 11:49:44
 * @Description: 通道
 */
import { request } from '@/utils/request'
export function channelDict() {
  return request('admin/channel/channel/indexDict', 'get')
}

export function channelList(data) {
  return request('admin/channel/channel/index', 'POST', { data: data })
}

export function editChannel(data) {
  return request('admin/channel/channel/edit', 'post', { data: { brand_id: process.env.VUE_APP_BRAND_ID, ...data } })
}
//新增
export function addChannel(data) {
  return request('admin/channel/channel/add', 'post', { data: { brand_id: process.env.VUE_APP_BRAND_ID, ...data } })
}

//禁用
export function delChannel(data) {
  return request('admin/channel/channel/del', 'post', { data: data })
}

//获取通道数据搜索
export function getThoroughfare(data) {
  return request('admin/channel/channel/selectPage', 'post', { data: data })
}
//获取银行
export function getAddress(data) {
  return request('admin/dict/bank/selectPage', 'post', { data: data })
}
//平台路由费率表格数据
export function getPlatformRoutingList(data) {
  return request('admin/channel/ChannelBank/index', 'post', { data: data })
}

// ------------------------------------------------------------------------------------------------------
export const getBankOptionAPI = object => request('admin/brand/channelBank/bankIndex', 'post', { data: object })
export const getChannelAPI = object => request('admin/common/widget/channelTypeList', 'post', { data: object })
export const getBrandListAPI = object => request('admin/brand/ChannelBank/index', 'post', { data: object })
export const batchOpenAPI = object => request('admin/brand/ChannelBank/batchEdit', 'post', { data: object })
export const syncAPI = id => request('admin/brand/channelBank/syncChannelBank', 'post', { data: id })
export const getListInfoAPI = object => request('admin/user/LevelChannelRate/index', 'post', { data: object })
export const editListInfoAPI = object => request('admin/user/LevelChannelRate/edit', 'post', { data: object })
export const getLevelListAPI = object => request('admin/user/LevelChannelBank/index', 'post', { data: object })
export const editLevelListAPI = object => request('admin/user/LevelChannelBank/edit', 'post', { data: object })
export const editBatchOpenAPI = object => request('/admin/channel/ChannelBank/batchEdit', 'post', { data: object })
